gusucode.com > 耐品图片管理系统 标准版A > 耐品图片管理系统 标准版A/Admin_UserGroup.asp
<!--#include file="Admin_ChkPurview.asp"--> <% '=============================================================== ' 著作权号:中国国家版权局著作权登记号2004SR07385 ' 版权所有:深圳市耐品科技开发有限公司 www.naipin.com ' 联系电话:0755-26611119 81234844 81234845 ' 联系手机:13316911914 ' 联系邮箱:naipin@naipin.com '=============================================================== Action=request.QueryString("Action") if Action="savename" then GroupName=Split(Request.Form("GroupName"),",") For i=0 to ubound(GroupName) conn.execute("update NT_UserGroup set GroupName='"&Trim(GroupName(i))&"' where ID="&I+1) Next Response.Write "<script>alert('修改成功')</script>" elseif Action="Modify" then GroupID=request.QueryString("GroupID") GroupSetting=request.QueryString("Purview") conn.execute("update NT_UserGroup set Setting='"&GroupSetting&"' where ID="&GroupID) conn.execute("update NT_User set Setting='"&GroupSetting&"' where GroupID="&GroupID) response.write "<script>this.location.href='Admin_UserGroup.asp';</script>" response.End() end if %> <html> <head> <title>用户组管理</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <% Behind.WriteHtmlHead Title="用 户 组 管 理" Link="<a href='Admin_Add.asp' class='black'>添加图片</a> | <a href='Admin_Images.asp' class='black'>管理图片</a> | <a href='Admin_User.asp' class='black'>管理用户</a> | <a href='Admin_Class.asp' class='black'>管理分类</a> | <a href='Admin_SiteConfig.asp' class='black'>系统配置</a>" Behind.WriteHtmlTop Title,Link %><form action="?action=savename" method="post"> <table width='100%' border="0" cellpadding="0" cellspacing="0" align="center"> <tr> <td><table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border"> <tr> <td width="15%" height="25" align="center" class="tdbg1">组名称</td> <% Dim m:m = 0 Dim SettingArray(5),SettingString(5) set rs=conn.execute("select * from NT_userGroup order by id") While Not rs.eof SettingString(m) = rs("Setting")&",0,0,0,0,0,0,0,0,0,0" SettingArray(m) = Split(Left(SettingString(m),21),",") %> <td class="tdbg1"><input name=GroupName value=<%=rs("GroupName")%> size=10></td> <% m = m + 1 rs.MoveNext Wend rs.close set rs=nothing Response.Write "</tr>" SettingName=Split("浏览图片,查看隐藏图片,打分评论,上传图片,图片不需要审核,管理自己图片,管理所有图片,发表"&Config.ThemeTitle&","&Config.ThemeTitle&"不需要审核,"&Config.ThemeTitle&"评论权限,查看原图",",") For i=0 to ubound(SettingName) If Instr("789",i) Then Else Response.Write "<tr class='tdbg'><td>"&SettingName(i)&"</td>"&vbcrlf&"<td><a href='#' class='red' onclick=""alert('管理员的权限不能修改');"">√"&vbcrlf For m = 1 To 4 Response.Write "</td><td>" if SettingArray(m)(i)="1" then response.Write("<a href='?Action=Modify&GroupID="&(m+1)&"&Purview="&Left(Left(SettingString(m),i*2)&"0,"&Right(SettingString(m),Len(SettingString(m))-(i+1)*2),21)&"' class='red'>√</td>") else response.Write("<a href='?Action=Modify&GroupID="&(m+1)&"&Purview="&Left(Left(SettingString(m),i*2)&"1,"&Right(SettingString(m),Len(SettingString(m))-(i+1)*2),21)&"' class='black'>×</a></td>") end if Next Response.Write "</tr>"&vbcrlf End If Next %> </table> </td> <tr> <td height="25" align="center">点击“√”和“×”可以修改每个用户组的权限</td> </tr> <tr> <td height="25" align="center"><input name="submit" type="submit" value="提交修改"></td> </tr> </tr> </table></form> <% Behind.WriteHtmlEnd %>